<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="user">
        <table v-show="user != null">
            <thead>
                <tr>
                    <th>id</th>
                    <th>name</th>
                    <th>age</th>
                    <th>lastUpdate</th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="item in user" :key="item.id">
                    <td>{{item.id}}</td>
                    <td>{{item.name}}</td>
                    <td>{{item.age}}</td>
                    <td>{{item.lastUpdate}}</td>
                </tr>
            </tbody>
        </table>
    </div>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script type="module">
        import { createApp } from "https://unpkg.com/vue@3/dist/vue.esm-browser.js";
        createApp({
            data(){
                return {
                    user:null
                }
            },
            methods:{
              getUserInfo(){
                  axios.get("http://localhost:8080/user").then((res)=>{
                        this.user = res.data;
                  }).catch((err)=>{
                      alert(err);
                  })
              }
            },
            mounted(){
                this.getUserInfo();
            }
        }).mount("#user")
    </script>


</body>
</html>